The present invention generally relates to debugging applications. More particularly, the present invention is directed to efficient debugging of applications by the use of a sampling based runtime optimizer.
Various events are triggered during a runtime of applications in a computing system. Collecting and analyzing these events help in debugging of the applications if a need arises to investigate or reproduce a fault that may have occurred during the application runtime. A fault is not necessarily an explicit runtime error seen by the user, it can be subtle mismatch of a certain micro-processor state that is only visible through system development tools. However, to check every runtime state at each single execution step is time-consuming and often a prohibitive task. Traditionally, performing sampling on hardware performance counters in a computing system is practiced to reduce overhead while maintaining statistical correctness of the measurements. However, there is a drawback of the sampling method. When the sampling rate is below the rate of occurrence of the events, the sampling method fails to capture all the events, thereby preventing reproduction of same runtime environment for debugging. Inconsistency on the support of hardware performance counters across runtime platforms also prevents the same event behavior from being monitored on different runtime platforms.
Thus, there is a need for an event-record and action-reproduce system to assist the sampling-based debugging.